#!/bin/sh

OFXMAC=$(/sbin/ifconfig eth0 | grep "HWaddr" | awk '{print$5}')
echo $OFXMAC
OFXMAC=$(/sbin/ifconfig eth10 2>/dev/null | grep "HWaddr" | awk '{print$5}')
echo $OFXMAC


#get OFXIFINDEX from macAddress
OFXMAC=00:0C:29:6E:A5:AD
    if [ "$OFXMAC" != "" ]
    then
        temp=$(/sbin/ifconfig -a | grep "$OFXMAC" | awk '{print $1}' | sed -e "s/eth//g")
        echo $temp
        if [ "$temp" != "" ]
        then
            OFXIFINDEX=$temp
echo $OFXIFINDEX
            export OFXIFINDEX
        fi
    fi
if [ "$OFXIFINDEX" = "" ]
then 
    echo asdkjfh
fi

/sbin/ifconfig eth$OFXIFINDEX

export ABC="ABC"
